<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>登录</title>
<script src="https://cdn.bootcss.com/angular.js/1.4.6/angular.min.js"></script>
<link rel="stylesheet"
	href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

</head>
<body >
<div class="container"ng-app="loginapp" ng-controller="loginController">
	<div class="row clearfix">
	<div class="col-md-4 column">
		</div>
		<div class="col-md-6 column">
			<div class="page-header">
			    <h1>
			        登录
			    </h1>
			</div>
		</div>
		<div class="col-md-2 column">
		</div>
	</div>
	<div class="row clearfix">
		<div class="col-md-4 column">
		</div>
		<div class="col-md-4 column">
				<div class="row clearfix">
						<div class="col-md-12 column">
							<label for="name">用户名</label> <input type="text"
								class="form-control" id="name" name="name"ng-model="name"
								placeholder="请输入名称" required>
								<span style="color:red" ng-show="myForm.name.$dirty && myForm.name.$invalid">
                      <span ng-show="myForm.name.$error.required">用户名是必须的。</span>
                                    </span>

						</div>
					</div>
			<div class="row clearfix">
				<div class="col-md-12 column">
					<label for="name">密码</label>
	    			<input type="password" class="form-control" id="pwd" ng-model="pwd" placeholder="请输入名称"required>
	    			<span style="color:red" ng-show="myForm.pwd.$dirty && myForm.pwd.$invalid">
                      <span ng-show="myForm.pwd.$error.required">密码是必须的。</span>
                                    </span>
				</div>
			</div>
			<div class="row clearfix">
				<div class="col-md-12 column" style="padding-top: 10px">
					<button ng-click="onclickLogin()" id="btnlogin" ng-disabled="myForm.pwd.$dirty && myForm.pwd.$invalid||myForm.name.$dirty && myForm.name.$invalid" type="button" class="btn btn-primary">登录</button>
				</div>
			</div>
			<a href="/test/register.html">没有账号注册一个</a>
		</div>
		<div class="col-md-4 column">
		</div>
	</div>
	<!-- 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">登录失败</h4>
            </div>
            <div class="modal-body" id="model"> <label id="errorMsg">{{errorMsg}}</label></div>
            <div class="modal-footer">
           
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
               
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</div>
<script type="text/javascript" src="/test/js/login.js"></script>

</body>
</html>